{% extends 'home/base.html' %}

{% block title %}Update item(不填默认继承原值){% endblock %}
{% block heading %}Update item(不填默认继承原值){% endblock %}
{% block body %}

<div class="container">
<div class="row">
   <form class="col s12" action='/stock/do_add_med/' method="POST">
    {%csrf_token%}
    <div class="row">
      </div>
      <div class="input-field col s12">
        <input type="text" name='medicine_name' id="medicine_name" placeholder={{items.item_name}}>
        <label for="medicine_name" class="active">medicine name</label>
      </div>
        <div class="input-field col s6">
        <input type="number" name='cost_price' id="cost_price" placeholder={{items.cost_price}}>
        <label for="cost_price(RMB)" class="active">cost price</label>
      </div>
      <div class="input-field col s6">
        <input type="number" name='sell_price' id="sell_price" placeholder={{items.sell_price}}>
        <label for="sell_price" class="active">sell price</label>
      </div>
      <div class="input-field col s12">
        <select name="manufacturer" id="manufacturer" class="validate" required>
          {% for manu in manufacture %}
            <option value='{{manu.pk}}'>部门名称:{{manu.department_name}}</option>
          {% endfor %}
        </select>
      </div>
       <div class="input-field col s12">
        <input type="text" name='description' id="description"  placeholder={{items.description}}>
        <label for="description" class="active">description</label>
      </div>
      <button type="submit" class="btn">update this medicine</button>
    </div>
  </form>
  <a href="/stock/delete_medicine/{{stock.pk}}"><button class="btn red">Delete this medicine</button></a>
</div>
</div>
{% endblock %}
